package com.cq.hd.task.web.job;

import com.cq.hd.order.api.TbInvoiceRecordApi;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class InvoiceTask {

    @Autowired
    private TbInvoiceRecordApi invoiceRecordApi;

    // 定时给余额支付税筹开票(给经纪人佣金开票)
    // 每个月5号给上个月的余额支付税筹开票  20 10 1 5 * ? 每月5号1点10分20秒触发任务
    @XxlJob("invoiceAgentAmt")
    public void execute() {
        log.info("定时给余额支付税筹开票=====>开始");
        invoiceRecordApi.invoiceAgentAmtJob();
        log.info("定时给余额支付税筹开票=====>结束");
    }

}
